/**
 *@auther: tang
 *@Date: 2020-11-16
 *Project: group-booking-shop-manage-system
 */
import React from "react"
import ImgCrop from 'antd-img-crop';
import {
    Row,
    Col,
    Form,
    Input,
    Button
} from 'antd';

class ShowSetting extends React.Component {
    constructor(props) {
        super(props);
        this.state={
            pcLogofileList:[{
                uid: '-1',
                name: 'image.png',
                status: 'done',
                url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png',
            }],
            wChatLogofileList:[{
                uid: '-1',
                name: 'image.png',
                status: 'done',
                url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png',
            }],
            custype:1,
            closeshop:false,
            clShopReason:false,
            initialValues:{
                commentcount: undefined,
                displaylist: undefined,
                prolength: undefined,
                rule: undefined,
                salesrank: undefined
            }
        }
    }
    componentWillMount() {
        this.state.closeshop?this.setState({
            clShopReason:false
        }):this.setState({
            clShopReason:true
        })
    }
    formSubmitHandle(info){
        console.log(info)
    }
    render() {
        return (
            <div>
                <Form
                    labelCol={{
                        span: 4,
                    }}
                    wrapperCol={{
                        span: 20,
                    }}
                    layout="horizontal"
                    size="default"
                    initialValues={this.state.initialValues}
                    onFinish={this.formSubmitHandle.bind(this)}
                >
                    <Form.Item label="销量排行数据" name="salesrank">
                        <Input />
                    </Form.Item>
                    <Form.Item label="评论数量" name="commentcount">
                        <Input />
                    </Form.Item>
                    <Form.Item label="商品名长度" name="prolength">
                        <Input />
                    </Form.Item>
                    <Form.Item label="商品分类页列表显示的数量" name="displaylist">
                        <Input />
                    </Form.Item>
                    <Form.Item label="助力免单规则" name="rule">
                        <Input.TextArea />
                    </Form.Item>
                    <Form.Item >
                        <Row>
                            <Col span={20}/>
                            <Col span={4}>
                                <Button htmlType="submit" type="primary">提交</Button>
                            </Col>
                        </Row>
                    </Form.Item>
                </Form>
            </div>
        )
    }
}

export {ShowSetting as default}


